﻿// Namespaces to use (For DirectX)
using System.Windows.Forms;
using System.Collections.Generic;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
using Microsoft.DirectX.DirectSound;

namespace Space_Conquest
{
    class Globals
    {
        /// <summary>
        /// The height and width of all tiles
        /// </summary>
        public const int TILE_SIZE = 64;

        /// <summary>
        /// Location for Images and Sounds
        /// </summary>
        public const string RESOURCE_DIRECTORY = "../Resources/";

        /// <summary>
        /// Main DirectX Device, created by Form when it loads
        /// </summary>
        public static Microsoft.DirectX.Direct3D.Device device;

        /// <summary>
        /// Is Game Running? Should Game Loop Continue?
        /// </summary>
        public static bool bRunning = false;

        /// <summary>
        /// Use the map editor?
        /// </summary>
        public static bool bMapEditor = false;

        public static int iMapEditorTilesX = 0;
        public static int iMapEditorTilesY = 0;
        public static string iMapEditorMapName = "";

        /// <summary>
        /// Horizontal Screen Offset, used internally by Sprite class
        /// </summary>
        public static int iScreenOffsetX = 0;

        /// <summary>
        /// Vertical Screen Offset, used internally by Sprite class
        /// </summary>
        public static int iScreenOffsetY = 0;

        public static int iScreenWidth;
        public static int iScreenHeight;

        /// <summary>
        /// The main game stack used to hold Menus and the Game Engine
        /// </summary>
        public static Stack<IMenu> GameStack = new Stack<IMenu>();

        /// <summary>
        /// Shuts down application, cleans up first then closes
        /// </summary>
        public static void EndProgram()
        {

            // Stop Music if Playing
            Audio.StopMusic();

            // Tells other functions (like the Paint event), to stop
            bRunning = false;

        }

    }


}